import request from '@/utils/request'
// 获取菜单列表
export function menuPage (params) {
  return request({
    url: `/menu/page?size=${params.size}&current=${params.current}`,
    method: 'post',
    data: params
  })
}
// 删除菜单
export function menuDel (id) {
  return request({
    url: `/menu/${id}`,
    method: 'DELETE'
  })
}
// 添加菜单
export function addMenu (query) {
  return request({
    url: '/menu',
    method: 'post',
    data: query
  })
}
// 编辑菜单
export function editMenu (query) {
  return request({
    url: '/menu',
    method: 'put',
    data: query
  })
}
export function menuTree () {
  return request({
    url: '/menu/tree',
    method: 'get'
  })
}
